package com.cuitrip.apiservice;


import com.cuitrip.storage.prefrence.SettingPreferences;

public class BusinessHelper {

    public static final String BASE_PRE_URL = "http://42.121.16.186:8888";
    public static final String BASE_DEV_URL = "http://192.168.0.170:8080";
    public static final String BASE_ONLINE_URL = "http://api.cuitrip.com";


    public static final String API_SERVICE = "/baseservice/";

    public static String API_URL = BASE_ONLINE_URL;

    public static final String API_VERSION = "1.0";

    public static String getApiUrl(String api){
        return API_URL + API_SERVICE + api;
    }

    public static void setApiHost(String host){
        SettingPreferences.getInstance().putString(SettingPreferences.DebugKeys.KEY_API_HOST, host);
        refreshApiHost(host);
    }

    private static void refreshApiHost(String host){
        API_URL = host;
    }


}
